<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>事件冒泡</title>
  <script>
    function clickDiv(){
      // alert("正在点击div")
      open("19_添加操作.html","aa","width=400px,height=300px")
    }
    function clickA(){
      // alert("这是点击超链接")
      document.getElementById("d").style.display="none";
      // console.log(event);
      // 老版本
      // event.cancelable = true;
      // 新版本
      event.stopPropagation();
    }
  </script>
</head>
<body>
<div id="d" style="width: 200px;height: 100px;background: red;display: block;"onclick="clickDiv()">

  <a href="javascript:;" onclick="clickA()">X</a>
</div>
</body>
</html>